package pl.iachoo.ctl.tabory.dao.core.mybatis.ds;

import javax.sql.DataSource;

import org.apache.ibatis.datasource.pooled.PooledDataSource;
import org.apache.log4j.Logger;

public class CtlDataSourceFactory {

	private final static Logger logger = Logger
			.getLogger(CtlDataSourceFactory.class);

	public static DataSource getCtlDataSource() {
		logger.info("Creating new PooledDataSource instance...");
		String driver = "org.h2.Driver";
		String url = "jdbc:h2:tcp://localhost:9092/~/.ctl_wagony/ctl_wagony";
		DataSource dataSource = new PooledDataSource(driver, url, "sa", "sa");
		return dataSource;
	}
}
